<div class="grid">
	<table cellspacing="0" class="data" width="100%">
		<thead>
			<tr class="headings">
				<th class="a-center">Order</th>
				<th class="a-center">Date</th>
				<th class="a-right">Total HT</th>
				<th class="a-right">Total TTC</th>
				<th class="a-center">Status</th>
			</tr>
		</thead>
		<tbody>
			<?php
				$collection = $this->getOrders();
				foreach ($collection as $item)
				{
					echo '<tr>';
					echo '<td align="center"><a href="'.$this->getUrl('Purchase/Orders/Edit').'po_num/'.$item->getpo_num().'">'.$item->getpo_order_id().'</a></td>';
					echo '<td align="center">'.$item->getpo_date().'</td>';
					echo '<td class="a-right">'.$item->getCurrency()->formatTxt($item->getTotalHt()).'</td>';
					echo '<td class="a-right">'.$item->getCurrency()->formatTxt($item->getTotalTtc()).'</td>';
					//definit le status
					$status = '';
					if ($item->getpo_sent() == 1)
						$status .= '<img src="'.$this->getSkinUrl('images/fam_page_white_edit.gif').'" alt="Sent to supplier">&nbsp;';
					if ($item->getpo_paid() == 1)
						$status .= '<img src="'.$this->getSkinUrl('images/fam_money.gif').'" alt="Paid">&nbsp;';
					if ($item->getpo_finished() == 1)
						$status .= '<img src="'.$this->getSkinUrl('images/fam_bullet_success.gif').'" alt="Finished">&nbsp;';
					echo '<td align="center">'.$status.'&nbsp;</td>';
					echo '</tr>';
				}
			?>
		</tbody>
	</table>
</div>